home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-08-22 | 2.2 KB | 61 lines | [TEXT/GEOL] |
- Item 7442823 21-July-89 07:26
-
- From: AU0008 Kopfwerk EDV SW Entwicklung
-
- To: MACAPP.TEST MacApp SQA Team
-
- cc: MACAPP.TECH$ MACAPP Tech
-
- Sub: MacApp 2.0b9 CanDismiss bug
-
- Dear colleagues,
- I found a bug in real-b9 (also in 8.2): You can accept a dialog with a
- deactivated and dimmed "OK" button (more correct: fDefaultItem) with the return
- key.
- e.g. in a find dialog deactivate the "Find" button if there is no string.
- The "changed list" says it is fixed and it is true that CanDismiss tests for
- IsViewEnabled, but it doesn´t use the result.
-
- ##########################################################################
- FUNCTION TDialogView.CanDismiss(dismissing: IDType): BOOLEAN;
-
- VAR
- dismissingView: TView;
- aBool: BOOLEAN; (* new *)
-
- BEGIN
- { First, make sure the view initiating the dismissal, if any, is enabled. }
-
- IF LONGINT(dismissing) <> LONGINT(kNoIdentifier) THEN
- dismissingView := FindSubView(dismissing)
- ELSE
- dismissingView := NIL; { no dismissing view }
-
- (* when dismissing <> fCancelItem -> *)
- (* CanDismiss will be true regardless of IsViewEnabled *)
- (* 7/20/89 by Tommi GESSL, KOPFWERK *)
- {$IFC FALSE}
- CanDismiss := (dismissingView = NIL) | (dismissingView.IsViewEnabled);
- {$ELSEC}
- aBool := (dismissingView = NIL) | (dismissingView.IsViewEnabled);
- CanDismiss:= aBool;
-
- if aBool then (* test only we haven´t failed *)
- {$ENDC}
- { Now, if we're not cancelling, make sure the current edit text is
- valid and return false if it isn't.}
- IF (LONGINT(fCancelItem) = LONGINT(kNoIdentifier)) |
- (dismissing <> fCancelItem) THEN
- BEGIN
- { Attempt to deselect current edit text }
- DoSelectEditText(NIL, False);
- { Successful only if it was deselected }
- CanDismiss := fCurrentEditText = NIL;
- END;
- END;
- ##########################################################################
-
- sincerly,
- Tommi, KOPFWERK SW Dev.
-
-